package com.yami.shop.bean.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yami.shop.common.serializer.json.ChainJsonSerializer;
import com.yami.shop.common.serializer.json.ChannelJsonSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RedPacketVo implements Serializable {
    @Schema(description = "红包id")
    private Long redPacketId;
    @Schema(description = "红包创建用户id")
    private String userId;
    @Schema(description = "红包创建用户名称")
    private String userName;
    @Schema(description = "红包创建用户头像")
    private String userPortrait;
    @Schema(description = "红包总共金额")
    private Double totalAmount;
    @Schema(description = "红包总共个数")
    private Integer totalPacket;
    @Schema(description = "红包剩余金额")
    private Double remainingAmount;
    @Schema(description = "剩余红包个数")
    private Integer remainingPacket;
    @Schema(description = "红包类型 0:人民币红包 1:DAW红包 2:Gas红包")
    private String type;
    @Schema(description = "红包标题")
    private String title;
    @Schema(description = "链接名称")
    @JsonSerialize(using = ChainJsonSerializer.class)
    private String address;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "本次抢到红包的金额")
    private Double thisAmount;

    @Schema(description = "是否支付1已支付0未支付")
    private Integer isPayed;

    @Schema(description = "领取红包的总金额")
    private Double receiveAmount;

    @Schema(description = "红包状态1过期0正常")
    private Integer status;

    private String dawName;
    @JsonSerialize(using = ChannelJsonSerializer.class)
    private String channelCode;
    private String denomId;

    private String dawImag;
    private String chainType;

    @Schema(description = "红包打开记录")
    private List<RedPacketUserVo> userRecords;

    @Schema(description = "商品ID")
    private Long prodId;

}
